package org.ruoyi.interview.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import lombok.Data;

/**
 * ModelScope配置类
 *
 * @author ruoyi
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "modelscope")
public class ModelScopeConfig {

    /**
     * API配置
     */
    private Api api = new Api();

    @Data
    public static class Api {
        /**
         * API地址
         */
        private String url = "https://api.modelscope.cn/v1/chat";

        /**
         * API认证Token
         */
        private String token = "ms-b4cce3b6-9a9d-4fb1-9713-ccb77ba72934";
        
        /**
         * 是否启用代理
         */
        private boolean proxyEnabled = false;
        
        /**
         * 代理主机
         */
        private String proxyHost = "127.0.0.1";
        
        /**
         * 代理端口
         */
        private int proxyPort = 8080;
        
        /**
         * 备用API地址（当DNS解析失败时使用）
         */
        private String fallbackUrl = "https://47.110.138.66/v1/chat";
    }
}